#include "dialog.h"
#include "ui_dialog.h"

Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
}

Dialog::~Dialog()
{
    delete ui;
}

void Dialog::setText(QString str)
{
    ui->textBrowser->setText(str);
}

void showDialog(QString title, QStringList msg)
{
    Dialog *dialog = new Dialog();
    dialog->setWindowTitle(title);
    dialog->setFixedSize(dialog->height(), dialog->height());
    dialog->setText(msg.join("</p><p>") + "</p>");
    dialog->show();
}
